<!DOCTYPE HTML>
<html>
@include('Admin.Common.header')
<body>
<article class="page-container">

    <form action="{{url('bookadd')}}" method="post" class="form form-horizontal" id="form-member-add" enctype="multipart/form-data" >
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3">
                <span class="c-red">*</span> 文章名称：
            </label>
            <div class="formControls col-xs-4 col-sm-5">

                <input type="text" class="input-text" id="article_name"  name="article_name" >
            </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span> 文章分类：</label>
            <div class="formControls col-xs-4 col-sm-5"> <span class="select-box">

				<select name="article_category" id="article_category" class="select">
                    option value="">Select...</option>
                    <option value="1">网站首页</option>
                                            <option value="2">PHP</option>
                                            <option value="3">SQL</option>
                                            <option value="4">关于我</option>
				</select>
				</span> </div>
        </div>

        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span> 文章描述：</label>
            <div class="formControls col-xs-4 col-sm-5">
                <textarea class="textarea" id="desc"  placeholder="填写文章详情" name="desc"></textarea>
            </div>
        </div>

        <div class="row cl">
            <div class="col-9 col-offset-3">

                <input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;添加&nbsp;&nbsp;" id="button">
                &nbsp;&nbsp;
                <span style="color: lightslategrey; font-size: 10px">
                    注意: * 为必填项,请仔细填写
                </span>

            </div>
        </div>
    </form>

</article>
@include('Admin.Common.footer')
<script>
    $(function () {
        $('#subBtn').click(function () {
            var article_name = $('#article_name').val();
            var article_category = $('#article_category').val();
            // var content = $('#content').val();
            var desc = $('#desc').val();
            $.post("{{url('bookadd')}}", {article_name:article_name, article_category:article_category,desc:desc}, function (e) {
                if(e.status)
                {
                    successAlert(e.info);
                   window.parent.location.reload();
                }else {
                    errorAlert(e.info);
                }
            })

        });
    })
</script>
</body>
</html>